package com.ny.demo428;

public class Home extends Bx{
    private double houseValue;
    private double houseArea;
    public Home(double houseValue, double houseArea) {
        this.houseValue = houseValue;
        this.houseArea = houseArea;
    }
    @Override
    public double add() {
        double basicPremium = houseValue * 0.015;
        if (houseArea > 100) {
            return basicPremium * 1.05;
        }
        return basicPremium;
    }
}
